//
//  Discover_MindPageTool.m
//  MindBox
//
//  Created by MS on 16-1-13.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "Discover_MindPageTool.h"

@implementation Discover_MindPageTool

+ (void)mindPageListDataWithParam:(Param *)param Success:(void (^)(Mind_Detail * data))success failure:(void (^)( NSError *error))failure
{
    [LGHttpTool GET:@"http://app.xinyihezi.com:8888/activity/" parameters:[param mj_keyValues] success:^(id responseObject) {
        
       Mind_DetailModel * goodsData = [Mind_DetailModel mj_objectWithKeyValues:responseObject];
        Mind_Detail * data = goodsData.data;
        
        if (success) {
            
            success(data);
        }
        
        
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
        
    }];
}

+ (void)mindBannerDataWithParam:(NSString *)good_id Success:(void (^)(GoodsDetailModel * data))success failure:(void (^)( NSError *error))failure
{
    
    NSString * url = [NSString stringWithFormat:@"http://app.xinyihezi.com:8888/good/?search_type=1&goodid=%@",good_id];
    
    [LGHttpTool GET:url parameters:nil success:^(id responseObject) {
        
        GoodsDetailModel * goodsData = [GoodsDetailModel mj_objectWithKeyValues:responseObject[@"data"]];
        
        if (success) {
            
            success(goodsData);
        }
        
        
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
        
    }];
}




@end
